// taskStorage.h

#pragma once
#ifndef TASKSTORAGE_H
#define TASKSTORAGE_H

#include <string>
#include <vector>
#include <sstream>
#include <fstream>
#include "Task.h"

class TaskStorage { 
private:
    static const std::string _fileName;	

	std::ifstream _fileInput;
	std::ofstream _fileOutput;

	std::vector<Task> _taskList;
	Task *_taskPtr;

public:
	TaskStorage();
	TaskStorage(std::string);
	~TaskStorage();

	bool isEmptyFile();
	bool loadFile(std::vector<Task> &);
	bool writeFile(std::vector<Task>);
	void writeTaskList();

	std::vector<Task> getTaskList();

	void updateTaskList(std::vector<Task>); 
};

#endif